{{/* Copyright 2017 The LUCI Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */}}
{{define "base"}}
<!DOCTYPE html>

<html lang="en">
<head>
  <meta http-equiv="Content-type" content="text/html; charset=UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="/static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
  <title>{{template "title" .}} - LUCI Migration</title>
  <style type="text/css">
    body {
      padding-top: 10px;
      padding-bottom: 10px;
    }
    .navbar {
      margin-bottom: 20px;
    }
    #account-picture-nav {
      margin-top: 10px;
      margin-bottom: 10px;
    }
    #account-picture-nav img {
      border-radius: 6px;
    }
    #account-text-nav {
      margin-left: 8px;
      margin-right: 0px;
    }
    footer hr {
      margin: 10px 0px;
    }
  </style>
  {{block "head" .}}{{end}}
</head>

<body>
  <div class="container">
    <div class="navbar navbar-default" role="navigation">
      <div class="navbar-header">
        <button type="button" class="navbar-toggle"
                data-toggle="collapse" data-target=".navbar-collapse">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <span class="navbar-brand">
          <span id="progress-spinner" class="not-spinning">
            <a href="/">LUCI Migration</a>
          </span>
        </span>
      </div>
      <div class="navbar-collapse collapse">
        <ul class="nav navbar-nav"></ul>
        <p class="nav navbar-text navbar-right" id="account-text-nav">
          {{if .IsAnonymous}}
            <a href="{{.LoginURL}}" class="navbar-link">Login</a>
          {{else}}
            <span>{{.User.Email}}</span>
            <span> |</span>
            <a href="{{.LogoutURL}}" class="navbar-link">Logout</a>
          {{end}}
          {{if .User.Picture}}
          <p class="nav navbar-right" id="account-picture-nav">
            <img src="{{.User.Picture}}" width="30" height="30">
          </p>
          {{end}}
        </p>
      </div>
    </div>

    <div id="content-box">
      {{template "content" .}}
    </div>

    <footer>
      <hr>
      <div class="pull-left">
        <a href="https://chromium.googlesource.com/infra/infra/+/master/go/src/infra/appengine/luci-migration/README.md">
          Help</a>
      </div>
      <div class="pull-right" style="color: #cccccc">
        <small>Version: <span>{{.AppVersion}}</span></small>
      </div>
    </footer>
  </div>

  <script src="/static/jquery/jquery.min.js"></script>
  <script src="/static/bootstrap/js/bootstrap.min.js"></script>
</body>

</html>
{{end}}
